<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Model extends CI_Controller {
    function Model() {
        parent::__construct();
	$this->load->helper('html');
	$this->load->helper('url');
	$this->load->helper('form');
    }
    
    public function make(){        
        $make_id = $this->uri->segment(3);
        echo "<option value=''>Please select</option>";
        if($make_id)
        {
            $model_list = $this->db->get_where('psacar_model', array('make_id' => $make_id));
            foreach ($model_list->result() as $model)
            {
                echo "<option value='" . $model->id . "'>" . $model->name . "</option>";
            }
        }
    }
}